<div class="row m-n">
    <div tabset type="tab">
        <div tab heading="产品档案" active="activeFlag[0]" ng-click="changeTab(0)">
            <div class="row wrapper-y-sm">
                <div class="search-bar wrapper-none col-xs-12">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" title="配置表格列" ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>

                        <div class="btn btn-default base-color" ng-if="!isFWZ">
                            <i class="yb-icon ico-import-o"></i>
                            <ul class="more-tool">
                                <button class="btn" ng-click="importGuaranteePeriodAndHours()">
                                    <i class="yb-icon ico-import-o"></i>
                                    <span>导入三包期限和三包小时数</span>
                                </button>
                            </ul>
                        </div>
                        <div class="btn btn-default base-color">
                            <div translate-attr-title="导出">
                                <i class="yb-icon ico-export-o"></i>
                            </div>
                            <ul class="more-tool">
                                <li yb-download download-url="exportParam.sectionUrl"
                                    download-param="exportParam.sectionParam" download-key="ids">
                                    <i class="yb-icon ico-export-o"></i><span translate>导出</span> 
                                </li>
                                <li yb-download download-url="exportParam.allUrl" download-param="condition" download-duration="3">
                                    <i class="yb-icon ico-export-o"></i><span translate>导出全部</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')">高级搜索</button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" placeholder="整车编码" ng-model="condition.vehicleNo">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)">搜索</span>
                    </div>
                </div>
            </div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)" reset-data="reset()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label">整车编码：</label>
                        <input type="text" ng-model="condition.vehicleNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">整车零件号：</label>
                        <input type="text" ng-model="condition.vehicleMaterialNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">产品型号：</label>
                        <input type="text" ng-model="condition.productModel" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label">当前服务商：</label>
                        <input type="text" ng-model="condition.currentAgentName" class="form-control">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"><span>购机日期</span>：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.purchaseDateStart"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showPurchaseDateEnd=false;showPurchaseDateStart=!showPurchaseDateStart"
                            ng-change="checkDate(condition, 'purchaseDateStart', 'purchaseDateEnd')"
                            is-open="showPurchaseDateStart" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.purchaseDateEnd"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showPurchaseDateStart=false;showPurchaseDateEnd=!showPurchaseDateEnd"
                            ng-change="checkDate(condition, 'purchaseDateStart', 'purchaseDateEnd')"
                            is-open="showPurchaseDateEnd" close-text="关闭" modal-size="small" readonly>
                    </div>

                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"><span>出保日期</span>：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.warrantyReleaseDateStart"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showWarrantyDateEnd=false;showWarrantyDateStart=!showWarrantyDateStart"
                            ng-change="checkDate(condition, 'warrantyReleaseDateStart', 'warrantyReleaseDateEnd')"
                            is-open="showWarrantyDateStart" close-text="关闭" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.warrantyReleaseDateEnd"
                            datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="showWarrantyDateStart=false;showWarrantyDateEnd=!showWarrantyDateEnd"
                            ng-change="checkDate(condition, 'warrantyReleaseDateStart', 'warrantyReleaseDateEnd')"
                            is-open="showWarrantyDateEnd" close-text="关闭" modal-size="small" readonly>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true" has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                                <tr>
                                    <th width="40" class="text-center th-check border-l-none">
                                        <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                    </th>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth"
                                            fixed-width="tbStyle.scrollLeft"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                                <tr>
                                    <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                        ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                    </th>
                                </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td width="40" class="text-center border-l-none">
                                        <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)"></div>
                                    </td>
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                        title="{{item[itemCol.dataField]}}">
                                        <div class="font-0">
                                            <button class="btn btn-operate m-r-xs"
                                                ng-click="editData(item)"
                                                ng-disabled="!btnPermission.VEHICLE_EDIT||item.auditStatus==1"
                                                title="{{!btnPermission.VEHICLE_EDIT?'无权限执行此操作':''}}">编辑</button>

                                            <button class="btn btn-operate m-r-xs" ng-click="viewRepair(item.vehicleNo)">查看服务记录</button>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                                <tr ng-repeat="item in dataList track by $index"
                                    ng-class="{'row-selected': $index === markInfo.curRow}"
                                    ng-click="selectRow($index)">
                                    <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                        width="{{itemCol.width}}" ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                        <span ng-if="!itemCol.clickFn" title="{{item[itemCol.dataField]}}">{{item[itemCol.dataField]}}</span>
                                        <div ng-if="!!itemCol.clickFn" ng-switch="itemCol.clickFn">
                                            <div ng-switch-when="viewImg">
                                                <div ng-repeat="item in item[itemCol.dataField] track by $index" ng-click="viewImage(item.imgUrlShow)" style="display: inline-block;margin-right: 4px;">
                                                    <img ng-src="{{item.imgUrlShow}}" style="width: 25px;height: 25px;"/>
                                                </div>
                                            </div>
                                            <div ng-switch-when="viewDetail">
                                                <a class="btn-operate m-r-xs" ng-click="viewDetail(item)">{{item[itemCol.dataField]}}</a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0">暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选" yb-click="selectAll()"></div>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
        <div tab heading="编辑" active="activeFlag[1]" ng-if="activeFlag[1]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label">产品属性：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.productShuxing || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">产品型号：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.productModel || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">吨位：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.dunwei" yb-number-input disable-decimal="false" decimal-places="2" max="9999999.99">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">产品组：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.productGroup || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">整车零件号：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.vehicleMaterialNo || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">整车零件中文名：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.vehicleMaterialDesc || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">整车编码：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.vehicleNo || '-' }}
                        <span style="margin-left: 10px;color: #448AFD;cursor: pointer;" ng-click="viewGss(orderObj.vehicleNo)">一机一册</span>
                    </label>
                </div>
                <div class="form-group" ng-if="!isFWZ">
                    <label class="col-xs-2 control-label">所属代理商：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.belongAgentName || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">计时表小时数(h)：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.workHours || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">GPS小时数(h)：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.gpsHours || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">联系人：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.contract || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">联系人电话：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.phone || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">顾客单位：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.tenantName || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">所在省份：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.province || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">所在城市：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.city || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">详细地址：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.address || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">购机日期：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ (detailInfo.purchaseDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">工况：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.workCondition || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">三包期限/月：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.guaranteePeriod" yb-number-input max="9999999">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">三包小时数：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.guaranteeHours" yb-number-input disable-decimal="false" decimal-places="1" max="9999999.9">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">出保日期：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ (detailInfo.warrantyReleaseDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">质保状态：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ (detailInfo.warrantyStatus|WarrantyStatus) || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">当前服务商：</label>
                    <div class="col-xs-5 wrapper-none">
                        <div yb-form-clear ng-model="detailInfo.currentAgentName" title="detailInfo.currentAgentName" select-obj="selectAgent()" clear-form="clearAgent()" tips-name="当前服务商"></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">备注：</label>
                    <div class="col-xs-5 wrapper-none">
                        <input type="text" class="form-control" ng-model="detailInfo.remark" maxlength="200">
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-primary m-r-sm" ng-click="saveData(form.$valid)">保存</button>
                        <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                    </div>
                </div>
            </form>
        </div>
        <div tab heading="详情" active="activeFlag[2]" ng-if="activeFlag[2]">
            <form name="form" class="form-horizontal wrapper-md clearfix" novalidate>
                <div class="form-group">
                    <label class="col-xs-2 control-label">产品属性：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.productShuxing || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">产品型号：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.productModel || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">吨位：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.dunwei || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">产品组：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.productGroup || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">整车零件号：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.vehicleMaterialNo || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">整车零件中文名：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.vehicleMaterialDesc || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">整车编码：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.vehicleNo || '-' }}
                        <span style="margin-left: 10px;color: #448AFD;cursor: pointer;" ng-click="viewGss(orderObj.vehicleNo)">一机一册</span>
                    </label>
                </div>
                <div class="form-group" ng-if="!isFWZ">
                    <label class="col-xs-2 control-label">所属代理商：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.belongAgentName || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">计时表小时数(h)：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.workHours || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">GPS小时数(h)：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.gpsHours || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">联系人：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.contract || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">联系人电话：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.phone || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">顾客单位：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.tenantName || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">所在省份：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.province || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">所在城市：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.city || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">详细地址：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.address || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">购机日期：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ (detailInfo.purchaseDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">工况：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.workCondition || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">三包期限/月：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.guaranteePeriod || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">三包小时数：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.guaranteeHours || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">出保日期：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ (detailInfo.warrantyReleaseDate|YbDate:'yyyy-MM-dd HH:mm:ss') || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">质保状态：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ (detailInfo.warrantyStatus|WarrantyStatus) || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">当前服务商：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.currentAgentName || '-' }}
                    </label>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label">备注：</label>
                    <label class="col-xs-5 control-label p-l-n text-left spill-dots">
                        {{ detailInfo.remark || '-' }}
                    </label>
                </div>

                <div class="form-group">
                    <div class="col-xs-offset-2">
                        <button type="button" class="btn btn-default" ng-click="changeTab(0)">取消</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>